<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2020-02-25
 * Time: 17:29
 */

namespace Zwwl2016\Cluster;


class ClusterServices
{
    private $cluster;
    public function __construct(Cluster $cluster)
    {
        $this->cluster=$cluster;
    }

//    public static function Instance(Cluster $cluster)
//    {
//        $clusterServices = new ClusterServices($cluster);
//        return $clusterServices;
//    }

    /**
     * @param $serviceKey
     * @return  ClusterService 获取指定key的service
     */
    public function get($serviceKey)
    {
        return  new ClusterService($this->cluster,$serviceKey);
    }
}